package org.itzheng.myrxframe.ui.loading;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ProgressBar;

import org.itzheng.and.baseutils.ui.UIUtils;

/**
 * Title:<br>
 * Description: <br>
 *
 * @email ItZheng@ZoHo.com
 * Created by itzheng on 2019-4-16.
 */
public class LoadingView extends FrameLayout {
    public LoadingView(@NonNull Context context) {
        this(context, null);
    }

    public LoadingView(@NonNull Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public LoadingView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        ProgressBar progressBar = new ProgressBar(getContext());
        progressBar.setLayoutParams(new ViewGroup.LayoutParams(UIUtils.dip2px(50), UIUtils.dip2px(50)));
        ViewGroup.LayoutParams lp = progressBar.getLayoutParams();
        addView(progressBar);

    }
}
